package crontab

import (
	"fmt"
	"k8s-admin/dao/assetsmanagement"
	"k8s-admin/global"
	"time"
)

func StartCront() {
	ticker := time.NewTicker(time.Second * 15)
	for {
		<-ticker.C
		err := assetsmanagement.CrontabCPUInfo()
		if err != nil {
			global.TPLogger.Error(err)
		} else {
			fmt.Println("==========cpu信息采集定时任务执行成功==========")
		}

	}
}
